/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package compilador;

import erros.SemanticError;
import erros.LexicalError;
import erros.SyntaticError;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author rafael
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Lexico lexico = new Lexico();
        Sintatico sintatico = new Sintatico();
        Semantico semantico = new Semantico();

        LineNumberReader in = new LineNumberReader(new InputStreamReader(System.in));

        
        String line;
        try {
            line = in.readLine();
        } catch (IOException ex) {
           //Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }

        lexico.setInput(in);

        try {
            sintatico.parse(lexico, semantico);
            System.out.println(" = ");
//            System.out.println(trans.getResult());
        } catch (LexicalError e) {
            e.printStackTrace();
        } catch (SyntaticError e) {
            e.printStackTrace();
        } catch (SemanticError e) {
            e.printStackTrace();
        }


    }
}
